package org.jeecg.report.controller;

import com.baomidou.dynamic.datasource.annotation.DS;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.jeecg.common.api.vo.Result;
import org.jeecg.report.entity.QisSpcPointValue;
import org.jeecg.report.service.AvailabilityReportService;
import org.jeecg.report.service.ReportService;
import org.jeecg.report.vo.MachineReportVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author lichunyang
 * @ClassName QisSpcController
 * @Description SPC控制器
 */
@RestController
@AllArgsConstructor
@RequestMapping(value = "/report/machine")
public class MachineReportController {
    @Autowired
    private ReportService reportService;
    @GetMapping("/getMachineReport")
    @DS("#header.his")
    @ApiOperation(value = "获取设备故障统计报表", notes = "传入qmSpcParameterVO")
    public Result<Map<String, Object>> getMachineReport(@RequestParam Map<String, Object> params) {
        Map<String, Object> map =  reportService.getMachineReport(params);
        return Result.OK(map);
    }
}
